﻿using System;
class PointCheckHard
{
    static void Main()
    {
        int coordx;
        int coordy;
        Console.Write("Input coordinate X: ");
        while (true)
        {
            try
            {
                coordx = int.Parse(Console.ReadLine());
                break;
            }
            catch (Exception ex)
            {
                Console.Write(ex.Message + "\nPlease re-enter coordinate:");
            }
        }
        Console.Write("Input coordinate Y: ");
        while (true)
        {
            try
            {
                coordy = int.Parse(Console.ReadLine());
                break;
            }
            catch (Exception ex)
            {
                Console.Write(ex.Message + "\nPlease re-enter coordinate:");
            }
        }
        Console.WriteLine(coordx);
        Console.WriteLine(coordy);
        Console.ReadLine();
        if ((((coordx - 1) * (coordx - 1)) + ((coordy - 1) * (coordy - 1))) <= 9)
        {
            if ((coordx < -1) || (coordy > 1) || (coordy < -1))
            {
                Console.WriteLine("inside the circle and outside the rectangle");
                Console.ReadLine();
            }
            else
            {
                Console.WriteLine("inside the circle but allso inside the rectangle");
                Console.ReadLine();
            }
        }
        else
        {
            Console.WriteLine("NOT inside the circle");
            Console.ReadLine();
        }
        
    }
}

